package com.test.myspringproject;

import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextRefreshedEvent;
import org.springframework.stereotype.Component;

@Component
public class MyCleanLns implements ApplicationListener<ContextRefreshedEvent> {
    @Override
    public void onApplicationEvent(ContextRefreshedEvent event) {
        UserTest myLns = (UserTest) event.getApplicationContext().getBean("userTest");
        System.out.println("MyCleanLns11111111111111"+myLns.toString());
    }
}
